package com.bw.mapper;

import com.bw.domain.Channel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author THINKAPD
* @description 针对表【t_channel】的数据库操作Mapper
* @createDate 2024-07-08 15:13:50
* @Entity com.bw.domain.Channel
*/
public interface ChannelMapper extends BaseMapper<Channel> {

    List<Channel> list2();

    Channel get(Integer id);

    int publish();

    List<Channel> list3(Channel channel);

    @Update("update t_channel set  up_number=#{upNumber} where id =#{channelId}")
    int updateDBFromRedis(@Param("channelId") Object channelId, @Param("upNumber") Integer upNumber);

    @Update("update t_channel set comment_number=comment_number+1 where id =#{channelId}")
    void updateCommentNum(Integer channelId);
}





